import fetch from 'utils/fetch';
/**
 * 题目纠错
 */
//获取学科
export function getSubjectList() {
    return fetch({
        url: '/guidance/listSubject',
        method: 'post'
    });
}

//查看纠错列表
export function getProblemList(subjectName,statusType,page,rows) {
    const data={
        subjectName,
        statusType
    }
    return fetch({
        url: '/modifyError/queryModifyError/'+page+'/'+rows,
        method: 'post',
        data
    });
}
//错题详情
export function getProblemDetail(pId,subjectName) {
    const data={
        pId,
        subjectName
    }
    return fetch({
        url: '/modifyError/queryInfo',
        method: 'post',
        data
    });
}
//获取所有知识点
export function getAllTags(subjectName,questionId) {
    const data={
        subjectName,
        questionId
    }
    return fetch({
        url: '/modifyError/queryTag',
        method: 'post',
        data
    });
}
//获取所属题目知识点
export function getQuestionTag(subjectName,questionId) {
    const data={
        subjectName,
        questionId
    }
    return fetch({
        url: '/modifyError/queryQuestionTag',
        method: 'post',
        data
    });
}
//查询题目解析
export function getProblemAnalysis(subjectName,questionId) {
    const data={
        subjectName,
        questionId
    }
    return fetch({
        url: '/modifyError/queryQuestionAnalysis',
        method: 'post',
        data
    });
}
//处理
export function postUpdateError(pId) {
    const data={
        pId
    }
    return fetch({
        url: '/modifyError/updateModifyError',
        method: 'post',
        data
    });
}

//删除
export function postDeleteError(pId) {
    const data={
        pId
    }
    return fetch({
        url: '/modifyError/deleteModifyError',
        method: 'post',
        data
    });
}